package com.xianglong.mapper;


import com.xianglong.entity.testEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TestMapper{
    @Select("SELECT * FROM testtable ")
    List<testEntity> getAll();

    @Insert("INSERT INTO testtable(name) VALUES(#{name})")
    int insert(testEntity test);

    @Update("UPDATE testtable SET name = #{name} WHERE id = #{id}")
    int update(testEntity test);

    @Delete("DELETE FROM testtable WHERE id = #{id}")
    int delete(int id);
}
